home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr49 / waitfile.zip / WAITFILE.DOC < prev    next >
Text File  |  1995-03-15  |  1KB  |  32 lines

  1. WAITFILE is a multitasker-aware utility which waits until a file is either
  2. created, or optionally waits for one to be removed, giving up time slices
  3. while it waits.
  4.  
  5. usage:  WAITFILE filename seconds (remove)
  6.  
  7.   WAITFILE checks for the existence of 'filename' once every five seconds
  8.   and continues to retry the operation for as many 'seconds' as specified.
  9.  
  10.   The 'remove' keyword is optional and, if used, indicates that WAITFILE is
  11.   waiting for 'filename' to be removed instead of created
  12.  
  13.   When the confirming action occurs (when the filename is created, or if
  14.   "removed" is specified, when the file is removed), then WAITFILE exits
  15.   with an errorlevel of 1.
  16.  
  17.   After "seconds" expires, WAITFILE exits when an errorlevel of 0.
  18.  
  19.  
  20. Example usage inside of a batch file:
  21.  
  22.   :wait
  23.     waitfile c:\update.now 30
  24.     if errorlevel 1 goto process
  25.     rem we could do something else here which would happen once every
  26.     rem 30 seconds due to the "30" on the waitfile command line
  27.     goto wait
  28.  
  29.   :process
  30.     rem finish processing
  31.  
  32.